﻿using BamaTeaWebAPI.Models;
using BamaTeaWebAPI.Services;
using FX_API;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPIHelper;

namespace BamaTeaWebAPI.Controllers
{
    public class WutongController : ApiController
    {
        [HttpPost]
        public HttpResponseMessage UploadClue(WutongRequestModel requestModel)
        {
            FenxiangAPI.FetchToken();
            WutongService service = new WutongService();
            bool isSuccess = service.UploadToFX(requestModel);

            if (!isSuccess) return ResponseMessageHelper.Fail;

            return ResponseMessageHelper.SUCCESS;
        }
    }
}
